package com.aidong.home.biz.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.aidong.home.biz.TrnHomeBiz;
import com.aidong.home.dao.TrnHomeDao;
import com.aidong.home.entity.ActivityHome;
import com.aidong.home.entity.CourseHome;
import com.aidong.home.entity.FoodHome;

@Service("trnHomeBiz")
public class TrnHomeBizImpl implements TrnHomeBiz {
	
	private TrnHomeDao trnHomeDao;

	@Autowired
	public void setTrnHomeDao(TrnHomeDao trnHomeDao) {
		this.trnHomeDao = trnHomeDao;
	}

	@Override
	public List<FoodHome> getTrnFoodHome(Map<String, Object> map) {
		return trnHomeDao.getTrnFoodHome(map);
	}
	
	/**
	 * 根据推荐ID获取推荐商品的详情
	 * @param map
	 * @return
	 */
	public Map<String,Object> getTrnFoodHomeDetail (Map<String, Object> map){
		return trnHomeDao.getTrnFoodHomeDetail(map);
	}
	
	
	/**
	 * 新版首页信息课程
	 * @return
	 */
	public List<CourseHome> getTrnCourseHome(Map<String, Object> map){
		return trnHomeDao.getTrnCourseHome(map);
	}
	
	/**
	 * 新版首页信息活动
	 * @return
	 */
	public List<ActivityHome> getTrnActivityHome(Map<String, Object> map){
		return trnHomeDao.getTrnActivityHome(map);
	}

}
